# ---------- ---------- ---------- ---------- ---------- ----------
#
# contacts Makefile
#
# ---------- ---------- ---------- ---------- ---------- ----------


.PHONY: dev
dev:
	@black .
	@flake8 src tests --max-line-length 88


.PHONY: venv
venv:
	@python3 -m venv var/venv \
            && var/venv/bin/pip3 install --upgrade pip \
            && var/venv/bin/pip3 install wheel \
            && var/venv/bin/pip3 install ./ --use-feature=in-tree-build \
            && echo "Now run:" \
            && echo "    source ./var/venv/bin/activate"


.PHONY: test
test:
	@python3 -m unittest discover \
            -s tests \
            -t . \
            -v

.PHONY: clean
clean:
	@py3clean .
	@rm -rf var/
